<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        //【1】常规的字符串拼接
        var a = "1";
        var b = "2";
        var c = "4";
        var b = b + a;
        c += a; //此处相当于c=c+a
        console.log(b);
        console.log(c);
        //【2】concat方法
        var a1 = "a";
        var b1 = "b";
        var c1 = a1.concat(b1);
        console.log(c1); //ab
        //【2-1】concat连接多个字符串
        var res = "".concat("this", "is", "sky");
        console.log(res);
    </script>
</body>

</html>